"); ?> "; echo "File Exchange"; echo ""; echo ""; echo ""; ///////////////////////////////////////Ban check/Login check////////////////////////////// if((islogged($sid)==false)||($uid==0)){ ("Error!"); echo "
\"\"/You are not logged in
"; echo "or your session has expired.

"; echo "
\"\"/Enter username:

\"\"/Enter password:




\"\"/Register
\"\"/Home
"; boxend(); echo ""; exit(); } if(isbanned($uid)){ echo "\"\"/
"; echo "You are presently banned!

"; $banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1'")); $remain = $banto[0]- time(); $rmsg = gettimemsg($remain); echo "Time to finish your penalty: $rmsg

"; echo "
"; boxend(); echo ""; echo ""; exit(); } //Page headers /////////////////////////////////////////////Main Menu//////////////////////////////////////////// if($action=="main"){ ("File Exchange"); echo "

Audio
Video
Image
Document
Archive
Apps & Games
All Files

Search
Upload

NETFEVER team does not own or claim copyrights of the files uploaded here.We recognize that the copyrights for these files belong with the owners, authors or publishers. You can download any file you want but we will not be liable for any kind of damage that this service may cause you. Use it at your risk.
"; echo "
\"\"/Home"; } echo ""; //////////////////////////////Display file list//////////////////////////////////// if($action==""){ addonline(getuid_sid($sid),"Browsing $type1 files",""); $limit = 10; if(empty($page)){ $page = 1; } $limitvalue = $page * $limit - ($limit); switch($type1){ case "video" : $query = "SELECT filename, uid, dcount FROM ibwf_uploads WHERE mime='video' ORDER BY id DESC LIMIT $limitvalue, $limit"; $query1 = "SELECT filename, uid FROM ibwf_uploads WHERE mime='video'"; $iml = "\"\"/"; $type2 = "Videos"; break; case "image" : $query = "SELECT filename, uid, dcount FROM ibwf_uploads WHERE mime='image' ORDER BY id DESC LIMIT $limitvalue, $limit"; $query1 = "SELECT filename, uid FROM ibwf_uploads WHERE mime='image'"; $iml = "\"\"/"; $type2 = "Images"; break; case "audio" : $query = "SELECT filename, uid, dcount FROM ibwf_uploads WHERE mime='audio' ORDER BY id DESC LIMIT $limitvalue, $limit"; $query1 = "SELECT filename, uid FROM ibwf_uploads WHERE mime='audio'"; $iml = "\"\"/"; $type2 = "Sounds"; break; case "document" : $query = "SELECT filename, uid, dcount FROM ibwf_uploads WHERE mime='document' ORDER BY id DESC LIMIT $limitvalue, $limit"; $query1 = "SELECT filename, uid FROM ibwf_uploads WHERE mime='document'"; $iml = "\"\"/"; $type2 = "Documents"; break; case "archive" : $query = "SELECT filename, uid, dcount FROM ibwf_uploads WHERE mime='archive' ORDER BY id DESC LIMIT $limitvalue, $limit"; $query1 = "SELECT filename, uid FROM ibwf_uploads WHERE mime='archive'"; $iml = "\"\"/"; $type2 = "Archives"; break; case "apps" : $query = "SELECT filename, uid, dcount FROM ibwf_uploads WHERE mime='apps' ORDER BY id DESC LIMIT $limitvalue, $limit"; $query1 = "SELECT filename, uid FROM ibwf_uploads WHERE mime='apps'"; $iml = "\"\"/"; $type2 = "Applications"; break; default : $query = "SELECT filename, uid, dcount FROM ibwf_uploads ORDER BY id DESC LIMIT $limitvalue, $limit"; $query1 = "SELECT filename, uid FROM ibwf_uploads"; $iml = "\"\"/"; $type2 = "All Files"; break; } $result = mysql_query($query) or die("Error: " . mysql_error()); $totalrows = mysql_num_rows(mysql_query($query1)); if($totalrows == 0){ echo("Nothing to Display!
"); } while($row = mysql_fetch_array($result)){ $usr = getnick_uid($row['uid']); echo "$iml".$row['filename']."
Uploaded by: $usr
Viewed/Downloaded: ".$row['dcount']." times
"; } if($page != 1){ $pageprev = $page-1; echo("[Previous]
"); } $pagenext = $page+1; $numofpages = ceil($totalrows / $limit); if($page<$numofpages){ echo("
[Next]"); } /* for($i = 1; $i <= $numofpages; $i++){ if($i == $page){ echo("[$i]"); }else{ echo("[$i] "); } } if(($totalrows - ($limit * $page)) > 0){ $pagenext = $page+1; } */ mysql_free_result($result); echo "
Files uploaded in this category: $totalrows
"; echo "Page $page of $numofpages
"; echo "Jump to page:
"; echo "
"; echo ""; echo ""; echo "
"; echo "
Search"; echo "
Upload
"; echo "To upload files, your phone/browser should be XHTML/HTML compliant.
"; echo "Back to File Exchange
"; echo "\"\"/Home"; } /////////////////////////////////////////////Delete File(Mods only)//////////////////////////////////////////// if($action=="delete"){ $filename=$_GET['filename']; ("Deleting File"); if (ismod(getuid_sid($sid))){ $blah1=unlink("$ucdir/$filename"); $blah2=mysql_query("DELETE FROM ibwf_uploads WHERE filename='".$filename."'"); $deleter=getnick_uid(getuid_sid($sid)); mysql_query("INSERT INTO ibwf_mlog SET action='topics', details='$deleter deleted file ".$filename." from Uploads Center', actdt='".time()."'"); if($blah1&&$blah2){ echo "

File was successfully deleted! Go back

"; exit(); } else { echo "

There was some error! The file could not be deleted, please contact an administrator to manually delete the file. Go back

"; } } else{ echo "You are not a moderator!"; } } //////////////////////////////////View a file//////////////////////////////////////// if($action=="viewdetails"){ if (ismod(getuid_sid($sid))){ $del = "[DELETE]"; } $file=$_GET['file']; $details = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_uploads WHERE filename = '".$file."'")); ("File Information"); echo "

File ID: $details[0]
"; echo "Uploaded by: ".getnick_uid($details[1])."
"; echo "Filename: $details[2]
"; echo "Filesize: $details[4]
"; echo "File category: $details[8]
"; if(($details[1]==getuid_sid($sid)) || ismod(getuid_sid($sid))){ $blah="Edit"; } echo "Uploader's comment:$blah
".parsepm($details[10], $sid)."
"; echo "Downloader's Comments
"; echo "Uploaded on: $details[3]
"; echo "Uploaded through: $details[6]
"; echo "Uploaded from: $details[5]
"; if (isowner(getuid_sid($sid))){ echo "Phone Number: $details[7]
"; } echo "Viewed/Downloaded: $details[9] times
"; mysql_query("UPDATE ibwf_uploads SET dcount=$details[9]+1 WHERE filename='".$file."'"); echo "Download this file
"; if (ismod(getuid_sid($sid))){ echo "Delete this file"; } echo "\"\"/Home"; echo "

"; } /////////////////////////////Edit uploader's comment(mod and uploader only)//////////////////// if ($action=="edit"){ $file = $_GET["file"]; ("Edit Comment"); $detail = mysql_fetch_array(mysql_query("SELECT uid, description FROM ibwf_uploads WHERE filename='".$file."'")); if(($detail[0]==getuid_sid($sid)) || ismod(getuid_sid($sid))){ echo "Edit comment for $file
"; echo "
"; }else{ echo "You are not authorised to edit this file's comment!Go Back"; exit(); } } //////////////////////////////////////////Display downloders' comments////////////////////////// else if ($action=="comments"){ $fileid = $_GET["fileid"]; $uid = getuid_sid($sid); if($page=="" || $page<=0)$page=1; $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM iw_comup WHERE fileid='".$fileid."'")); $num_items = $noi[0]; //changable $items_per_page= 5; $num_pages = ceil($num_items/$items_per_page); if(($page>$num_pages)&&$page!=1)$page= $num_pages; $limit_start = ($page-1)*$items_per_page; $sql = "SELECT fileid, commenter, comment, time, id FROM iw_comup WHERE fileid='".$fileid."' ORDER BY time DESC LIMIT $limit_start, $items_per_page"; ("File Comments"); $items = mysql_query($sql); echo mysql_error(); if(mysql_num_rows($items)>0) { while ($item = mysql_fetch_array($items)) { if(isonline($item[1])) { $iml = "\"+\"/"; }else{ $iml = "\"-\"/"; } $snick = getnick_uid($item[1]); $lnk = "$iml$snick"; $bs = date("d/m/y h:i:s A",$item[3] + addhours()); echo "$lnk
"; if(ismod($uid)) { $delnk = "[x]"; }else{ $delnk = ""; } $text = parsepm($item[2]); echo "$text
$bs $delnk
"; } } echo "

"; if($page>1) { $ppage = $page-1; echo "«PREV "; } if($page<$num_pages) { $npage = $page+1; echo "Next»"; } echo "
Page $page of $num_pages
"; if($num_pages>2){ $rets = "

Jump to page"; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= ""; $rets .= "
"; } echo $rets; echo "

"; ////// UNTILL HERE >> echo "

"; echo ""; echo "Add your comment

"; } ////////////////////////////////////Post a comment(downloaders)//////////////////// else if ($action=="addcmnt"){ $fileid = $_GET['fileid']; ("Post Comment"); echo "

Text:

"; echo ""; echo "

"; } /////////////////////////////////delcmnt else if($action=="delcmnt") { ("Delete Comment"); $fileid = $_GET["fileid"]; addonline(getuid_sid($sid),"Deleting comment",""); echo "

"; if(ismod(getuid_sid($sid))) { $res = mysql_query("DELETE FROM iw_comup WHERE id='".$fileid."'"); if($res) { echo "\"o\"/Message Deleted From Comment List
"; }else{ echo "\"x\"/Database Error!
"; } }else{ echo "\"X\"/You can't delete this message"; } echo "

"; echo "
Uploads Center

"; } ///////////////////////////////////////postcmnt////////////////////////////////// else if($action=="postcmnt"){ $fileid = $_POST["fileid"]; $msgtxt = $_POST["msgtxt"]; $uid = getuid_sid($sid); addonline(getuid_sid($sid),"Commenting a file",""); ("Posting Comment"); echo "

"; $crdate = time(); //$uid = getuid_sid($sid); $res = false; if(trim($msgtxt)!="") { $res = mysql_query("INSERT INTO iw_comup SET fileid='".$fileid."', commenter='".$uid."', time='".$crdate."', comment='".$msgtxt."'"); } if($res) { echo "\"O\"/Message Posted Successfully"; }else{ echo "\"X\"/Error Posting Message"; } echo "
File Exchange
"; echo "

"; } ///////////////////////////////////////////////Edit uploaders comment mod and uploader only//////////////// if ($action=="edt"){ $file = $_GET["file"]; ("Edit Comment"); $comment=$_POST['comment']; $detail = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_uploads WHERE filename='".$file."'")); if(($detail[0]==getuid_sid($sid)) || ismod(getuid_sid($sid))){ $blah = mysql_query("UPDATE ibwf_uploads SET description='".$comment."' WHERE filename='".$file."'"); $doer = getnick_uid(getuid_sid($sid)); $blah1 = mysql_query("INSERT INTO ibwf_mlog SET action='topics', details='$doer edited comments for file ".$file." at File Exchange', actdt='".time()."'"); if($blah){ echo "Success in editing the comment!"; } else{ echo "Failure!!! Couldn't edit comment. Possible network congestion in database server. Try again later."; } } else{ echo "You are not authorised to edit this file's comment!Go Back"; exit(); } echo "
Uploads Center

"; } ?>